package com.vshop.service.impl;

import com.vshop.entity.alast.common.ServicePlanOrderRecord;
import com.vshop.entity.comentity.PackageAndOrderParamVo;
import com.vshop.entity.comentity.UserOrderPackage;
import com.vshop.entity.comentity.UserOrderPayment;
import com.vshop.mapper.UserOrderPackageMapper;
import com.vshop.service.UserOrderPackageService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional(rollbackFor = Exception.class)
@Service
public class UserOrderPackageServiceImpl implements UserOrderPackageService {
    @Resource
    UserOrderPackageMapper userOrderPackagePaymentMapper;

    @Override
    public List<UserOrderPackage> queryPackageOrderByCode(String partnerCode, String deviceCode) {
        return userOrderPackagePaymentMapper.queryPackageOrderByCode(partnerCode, deviceCode);
    }

    @Override
    public String queryAmount(String packageCode, String partnerCode, String deviceCode, String orderIds) {
        return userOrderPackagePaymentMapper.queryAmount(packageCode, partnerCode, deviceCode, orderIds);
    }

    @Override
    public int getOrderListByPackageInfo(String partnerCode, String deviceCode, String packageCode, String name, String packageType, String globalOrder, String orderPeriod, String payAmount, String payCurrency, String partnerScope, String orderNo) {
        return userOrderPackagePaymentMapper.getOrderListByPackageInfo(partnerCode, deviceCode, packageCode, name, packageType, globalOrder, orderPeriod, payAmount, payCurrency, partnerScope, orderNo);
    }

    @Override
    public void insertUserNoCard(UserOrderPackage order) {
        userOrderPackagePaymentMapper.insertUserNoCard(order);
    }

    @Override
    public void insertUserHaveCard(UserOrderPackage order) {
        userOrderPackagePaymentMapper.insertUserHaveCard(order);
    }

    @Override
    public void updateRenewOrderUserHaveCard(UserOrderPackage reneworder) {
        userOrderPackagePaymentMapper.updateRenewOrderUserHaveCard(reneworder);
    }

    @Override
    public void updateNewOrderUserHaveCard(UserOrderPackage neworder) {
        userOrderPackagePaymentMapper.updateNewOrderUserHaveCard(neworder);
    }

    @Override
    public List<UserOrderPackage> queryOrderFee(String orderId, String deviceCode) {
        return userOrderPackagePaymentMapper.queryOrderFee(orderId, deviceCode);
    }

    @Override
    public String queryAmountByCode(String orderId, String deviceCode, String partnerCode) {
        return userOrderPackagePaymentMapper.queryAmountByCode(orderId, deviceCode, partnerCode);
    }

    @Override
    public int getOrderListByPackageInfoNoCard(String partnerCode, String packageCode, String name, String packageType, String globalOrder, String orderPeriod, String payAmount, String payCurrency, String partnerScope, String orderNo) {
        return userOrderPackagePaymentMapper.getOrderListByPackageInfoNoCard(partnerCode, packageCode, name, packageType, globalOrder, orderPeriod, payAmount, payCurrency, partnerScope, orderNo);
    }

    @Override
    public List<UserOrderPackage> getRenewPackageList() {
        return userOrderPackagePaymentMapper.getRenewPackageList();
    }

    @Override
    public void updateRenewStatus(UserOrderPackage orderPackage) {
        userOrderPackagePaymentMapper.updateRenewStatus(orderPackage);
    }

    @Override
    public List<UserOrderPackage> getNoCardList() {
        return userOrderPackagePaymentMapper.getNoCardList();
    }

    @Override
    public void updateNoCardOrderId(UserOrderPackage order) {
        userOrderPackagePaymentMapper.updateNoCardOrderId(order);
    }

    @Override
    public List<UserOrderPackage> queryOrderByCode(String partnerCode, String deviceCode) {
        return userOrderPackagePaymentMapper.queryOrderByCode(partnerCode, deviceCode);
    }

    @Override
    public List<UserOrderPackage> queryOrderById(String partnerCode, String payId) {
        return userOrderPackagePaymentMapper.queryOrderById(partnerCode, payId);
    }

    @Override
    public List<UserOrderPackage> queryFee(String payId) {
        return userOrderPackagePaymentMapper.queryFee(payId);
    }

    @Override
    public void updateTimeAndStatus(UserOrderPackage kage) {
        userOrderPackagePaymentMapper.updateTimeAndStatus(kage);
    }

    @Override
    public int getCountByOrderId(String orderId) {
        return userOrderPackagePaymentMapper.getCountByOrderId(orderId);
    }

    @Override
    public List<UserOrderPackage> getChannelResultList() {
        return userOrderPackagePaymentMapper.getChannelResultList();
    }

    @Override
    public void updateyIsPartnerNotity(ServicePlanOrderRecord re) {
        userOrderPackagePaymentMapper.updateyIsPartnerNotity(re);
    }

    @Override
    public List<UserOrderPackage> getStatusTimeOrderList() {
        return userOrderPackagePaymentMapper.getStatusTimeOrderList();
    }

    @Override
    public List<UserOrderPackage> getListToOpen() {
        return userOrderPackagePaymentMapper.getListToOpen();
    }

    @Override
    public Integer updateIsOpen(UserOrderPackage userOrder) {
        return userOrderPackagePaymentMapper.updateIsOpen(userOrder);
    }

    @Override
    public int findCount(String partnerCode, String packageCode, String requestOrderId) {
        return userOrderPackagePaymentMapper.findCount(partnerCode, packageCode, requestOrderId);
    }

    @Override
    public void dataTransfer() {
        userOrderPackagePaymentMapper.dataTransfer();
    }

    @Override
    public void originalDataDelete() {
        userOrderPackagePaymentMapper.originalDataDelete();
    }

    @Override
    public List<UserOrderPackage> getListToPurchase() {
        return userOrderPackagePaymentMapper.getListToPurchase();
    }

    @Override
    public List<UserOrderPackage> queryRecord(String deviceCode, String payId, String startDate, String endDate) {
        return userOrderPackagePaymentMapper.queryRecord(deviceCode, payId, startDate, endDate);
    }

    @Override
    public String queryPartnerCode(String orderId) {
        return userOrderPackagePaymentMapper.queryPartnerCode(orderId);
    }

    @Override
    public String querySecret(String secret) {
        return userOrderPackagePaymentMapper.querySecret(secret);
    }
}
